package com.wtp;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.app.Activity;
import android.content.Intent;

public class MainActivity extends Activity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		LinearLayout textView = (LinearLayout) findViewById(R.id.wddb);
		TextView textView1 = (TextView) findViewById(R.id.ls);
		textView.setOnClickListener(this);
		textView1.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent intent;
		switch (v.getId()) {
		case R.id.wddb:
			intent = new Intent(MainActivity.this, OrderActivity.class);
			startActivity(intent);
			break;
		case R.id.ls:
			intent = new Intent(MainActivity.this, HistoryActivity.class);
			startActivity(intent);
			break;

		default:
			break;
		}
	}

}
